package com.xbongbong.workflow.model.impl;

import com.xbongbong.workflow.domain.dao.WorkflowBackupDataDao;
import com.xbongbong.workflow.domain.entity.WorkflowBackupDataEntity;
import com.xbongbong.workflow.model.WorkflowBackupDataModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 */
@Service("workflowBackupDataModel")
public class WorkflowBackupDataModelImpl implements WorkflowBackupDataModel {
    @Resource
    private WorkflowBackupDataDao workflowBackupDataDao;

    @Override
    public Long insert(WorkflowBackupDataEntity entity) {
        return workflowBackupDataDao.insert(entity);
    }

    @Override
    public void insertBatch(List<WorkflowBackupDataEntity> list) {
        workflowBackupDataDao.insertBatch(list);
    }

    @Override
    public List<WorkflowBackupDataEntity> findEntities(Map<String, Object> param) {
        return workflowBackupDataDao.findEntities(param);
    }

    @Override
    public Integer getEntityCount(Map<String, Object> param) {
        return workflowBackupDataDao.getEntitiesCount(param);
    }

    @Override
    public void update(WorkflowBackupDataEntity entity) {
        workflowBackupDataDao.update(entity);
    }

    @Override
    public WorkflowBackupDataEntity getByKey(Long key, String corpid) {
        return workflowBackupDataDao.getByKey(key, corpid);
    }

    @Override
    public WorkflowBackupDataEntity getByTaskId(Long taskId, String corpid) {
        return workflowBackupDataDao.getByTaskId(taskId, corpid);
    }

    @Override
    public void deleteByTaskIds(String corpid, List<Long> taskIds) {
        workflowBackupDataDao.deleteByTaskIds(corpid, taskIds);
    }

}
